package Exercise;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;

public class exercise1 {
	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<>();
		HashMap<String,Integer> map = new HashMap<>();
		Collections.addAll(list, "zhangsn,23","lisi,24","wangwu,25");
		for(int i=0;i<list.size();i++){
			String name = list.get(i).split(",")[0];
			int age = Integer.parseInt(list.get(i).split(",")[1]);
			if(age>24){
				map.put(name, age);
			}
		}
		System.out.println(map);

		
	}
}
